package com.cmj.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cmj.dao.UserRoleMapper;
import com.cmj.domain.entity.UserRole;
import com.cmj.service.UserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("userRoleService")
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public int delUserRole(Long id) {
        int i = userRoleMapper.deleteById(id);
        return i;
    }

    @Override
    public int addUserRole(UserRole userRole) {
        int insert = userRoleMapper.insertUserRole(userRole);
        return insert;
    }
}